/* lcapw.t  lcap_hist Licensed Capacity Write Trigger                         */
/*Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                         */
/*All rights reserved worldwide.  This is an unpublished work.                */
/* $Revision: 1.4 $                                                           */
/*V8:ConvertMode=NoConvert                                                    */
/******************************************************************************/
/* Revision: 1.3        BY: Jean Miller          DATE: 06/06/02  ECO: *P082*  */
/* $Revision: 1.4 $     BY: Jean Miller          DATE: 08/17/02  ECO: *P0FN*  */
/******************************************************************************/

TRIGGER PROCEDURE FOR WRITE OF lcap_hist OLD BUFFER old_lcap_hist.

{mfdeclre.i}

if not can-find (first mon_mstr where
                       mon_product = 'MFG/PRO' and
                       mon_userid  = global_userid and
                       mon_sid     = mfguser)
then do:
    assign
       lcap_hist.lcap__qadc02 = userid(sdbname("qaddb"))
       lcap_hist.lcap__qadt01 = today
       lcap_hist.lcap__qadi01 = time
       lcap_hist.lcap__qadd01 = lcap_hist.lcap__qadd01 + 1.
end.
